package com.battle.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import lombok.Data;
import nirvana.core.domains.ann.AccEntity;
import nirvana.core.domains.entity.DomainBaseEntity;
import nirvana.core.domains.enums.EntityType;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户考试管理
 * @author anni.zhu
 * @author anni.zhu@king-v.com
 * Created in 2025/2/21 14:20
 */
@Data
@TableName(value = "EXAM_STUDY",autoResultMap = true)
@Entity(name = "EXAM_STUDY")
@AccEntity(value = "用户考试管理", type = EntityType.SERVICE_ENTITY)
public class ExamStudy extends DomainBaseEntity<ExamStudy> {
    /**
     * 用户id
     */
    @Column()
    private Long userId;

    /**
     * 试卷id
     */
    @Column()
    private Long examId;

    /**
     * 考试开始时间
     */
    @Column()
    private LocalDateTime examStartTime;

    /**
     * 考试结束时间
     */
    @Column()
    private LocalDateTime examEndTime;

    /**
     * 考试时长 多少分钟
     */
    @Column(length = 255)
    private BigDecimal examDuration;

    /**
     * 考试状态：0进行中 1已结束
     */
    @Column(length = 255)
    private Integer examStatus;

    /**
     * 需要完成的题目数量
     */
    @Column()
    private Integer needFinishQuestionNum;

    /**
     * 已完成题目数量
     */
    @Column()
    private Integer finishQuestionNum;

    /**
     * 考试成绩
     */
    @Column()
    private BigDecimal examScore;

    /**
     * 题目总分
     */
    @Column()
    private BigDecimal totalScore;
}
